package com.example.common.consumer.service;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author wangjinlong
 * @date 2022/2/15 10:40
 */
//@Component
public class ConsumerFallbackFactory implements FallbackFactory<ConsumerService> {

    @Override
    public ConsumerService create(Throwable cause) {
        return new ConsumerService() {
            @Override
            public String get() {
                return "fegin 调用超时...";
            }
        };
    }
}
